﻿CREATE TABLE [CO].[DefekturaProbabilyties] (
    [Id]       INT           NOT NULL,
    [Code]     REAL          NULL,
    [Value]    REAL          NULL,
    [Value2]   REAL          CONSTRAINT [DF_DefekturaProbabilyties_Value2] DEFAULT ((0)) NULL,
    [Value3]   REAL          NULL,
    [Value4]   REAL          NULL,
    [Value5]   REAL          NULL,
    [Note]     VARCHAR (250) NULL,
    [MD]       DATETIME      CONSTRAINT [DF__DefekturaPro__MD__62BA8D0A] DEFAULT (getdate()) NOT NULL,
    [MW]       VARCHAR (50)  CONSTRAINT [DF__DefekturaPro__MW__63AEB143] DEFAULT (suser_sname()) NOT NULL,
    [ToDelete] BIT           CONSTRAINT [DF__Defektura__ToDel__77809FC6] DEFAULT ((0)) NOT NULL,
    CONSTRAINT [PK_DefekturaProbabilyties] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_DefekturaProbabilyties_Code]
    ON [CO].[DefekturaProbabilyties]([Code] ASC);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Признак того, что запись нужно удалить из БД всех подразделений', @level0type = N'SCHEMA', @level0name = N'CO', @level1type = N'TABLE', @level1name = N'DefekturaProbabilyties', @level2type = N'COLUMN', @level2name = N'ToDelete';

